import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(), vueJsx()],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: path.resolve('./src'),
      },
      {
        find: '@image',
        replacement: path.resolve('./src/assets/images'),
      },
      {
        find: '@router',
        replacement: path.resolve('./src/router'),
      },
      {
        find: '@store',
        replacement: path.resolve('./src/store'),
      },
      {
        find: '@api',
        replacement: path.resolve('./src/api'),
      },
      {
        find: '@utils',
        replacement: path.resolve('./src/utils'),
      },
      {
        find: '@views',
        replacement: path.resolve('./src/views'),
      },
      {
        find: '@styles',
        replacement: path.resolve('./src/styles'),
      },
    ],
  },
})
